package com.cyl.manager.oms.convert;

import org.apache.commons.collections.map.LinkedMap;

import cn.hutool.json.JSONUtil;

public class SukToString {

	public static String sukJsonToString(String json) {
		if(json==null) {
			return "";
		}
		try {
			String retValue = "";
			LinkedMap map = JSONUtil.toBean(json, LinkedMap.class);
			for (Object value : map.values()) {
				retValue = retValue+value+",";
			}
			retValue = retValue.substring(0, retValue.length()-1);
			return retValue;
		} catch (Exception e) {
			json = json.replaceAll("\\{", "").replaceAll("}", "").replace("\"", "");
		}
		
		return json;
	}
	
	public static void main(String[] args) {
		System.out.println(sukJsonToString("{\"鸡蛋\":\"20个\"}"));;
	}
}
